home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr49
/
352_01.zip
/
VECRVRS.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-10
|
543b
|
31 lines
/* VECTOR_reverse ()
* reverse the time direction of a complex VECTOR
* used by cross correlation routine
*/
#include <stdlib.h>
#include "wtwg.h"
#include "dblib.h"
#include "Vector.h"
Vector& Vector::reverse ( void )
{
int vn = n; float *vv = v;
float hold;
float *vvend = vv+ vn;
while ( --vn >= 0 )
{
/* switch real part */
hold = *vv;
*(vv++) = *vvend;
*vvend = hold;
--vvend;
}
return (*this); /* Vector::reverse() */
}
// ----------------- end VECRVRS.CPP --------------